This invention relates to a baud rate generator for generating a serial communication clock signal, more particularly to a baud rate generator suitable for integration into a low-power microcontroller.
Microcontrollers (also referred to as single-chip microcomputers) serve as embedded controllers in products spanning the range from electronic toys to large-scale industrial equipment. Many microcontrollers communicate with other electronic devices by means of a built-in serial communication port. In the commonly-employed asynchronous communication mode, the port transmits and receives data at a standard rate such as 300, 600, 1200, 2400, or 9600 bits per second (bps), referred to as a baud rate. This requires the microcontroller to generate a clock signal, referred to as a serial clock, with a frequency preferably within one per cent of the desired baud rate. Microcontrollers that operate on a stable system clock generated by an external crystal resonating at a high frequency such as 10 MHz can easily generate the required serial clock by dividing the system clock frequency. For a 9600-bps baud rate, for example, it suffices to divide 10 MHz by 1042, obtaining 9597 Hz, which differs from 9600 Hz by only about 0.03%.
Microcontrollers in some devices, however, must operate with very low current and power consumption, which entails running the microcontroller at a much slower system clock speed. The system clock of such a low-power microcontroller is typically generated by a crystal resonating at 32,768 Hz, the rate of the crystals employed in electronic wrist watches. This system clock frequency cannot be divided to obtain the higher baud rates mentioned above (1200, 2400, or 9600 bps) without incurring considerable frequency error. For example, the closest approximation to 9600 bps is obtained by dividing 32,768 Hz by three, but that gives 10,923 Hz, which is obviously unacceptable: the frequency error exceeds thirteen pet cent.
One possible solution to this problem is to use only a slower baud rate such as 300 or 600 bps, but this is too slow for many applications.
Another possible solution is to use a high-frequency external crystal resonator, the frequency of which is divided to obtain both the necessary lower system clock frequency and the still-lower baud rate. Use of a high-frequency resonator, however, exacts a stiff power and current penalty: current consumption rises from several microamperes to several milliamperes.
Yet another possible solution is to provide the microcontroller with two external crystals, one resonating at a low frequency to generate the system clock, and another resonating at a high frequency which is divided to generate the baud rate. The high-frequency crystal is activated only when serial communication is performed. This solution is unsatisfactory, however, because it increases the number of external components and adds significantly to the cost of the microcontroller system.